package com.example.demo.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 马拉圈
 * Date: 2023-08-24
 * Time: 10:44
 */
@RestController()
@RequestMapping("/test")
public class TestController {

    @RequestMapping("/say_hi")
    public Object sayHi() {
        return "<h1>Hi！</h1>";
    }
    @RequestMapping("/say_hello")
    public Object sayHello() {
        return "<h1>Hello！</h1>";
    }
    @RequestMapping("/login")
    public Object login() {
        return "<h1>login!</h1>";
    }

    @RequestMapping("/get_json")
    public Object getJSON() {
        Map<String, Object> map = new HashMap<String, Object>(){{
            put("success", -1);
            put("message", "6爆了");
            put("data", null);
        }};
        return map;
    }

}

